package cn.aj.feign;

import cn.aj.domain.User;
import cn.aj.ufallback.UserServiceFall;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(name = "application-user", contextId = "userService", path = "user", fallbackFactory = UserServiceFall.class)
public interface UserService {

    @GetMapping(value = "/{id}")
    User loadUser(@PathVariable Long id);
}
